<template>
  <div>
    <div class="container">
      <span>
        <ul>
          <li>21</li>
          <li>/</li>
          <li>01</li>
          <li>/</li>
          <li>04</li>
        </ul>
      </span>
      <span>星期五</span>
      <span><img src="~images/common/stu_clock.png" alt=""></span>
      <span><img src="~images/common/stu_therm.png" alt=""></span>
      <span>最后入闸</span>
      <span>{{dataInfo.temperature}}</span>
      <span>
        <ul>
          <li>21</li>
          <li>:</li>
          <li>01</li>
        </ul>
      </span>
      <span>
        <ul>
          <li>38</li>
          <li>.4</li>
        </ul>
      </span>
    </div>
    <div class="abnormal-container">
      <div class="abnormal-item">
        <span>体温异常（异常类型）</span>
        <span>11/13 21:30 测量 {{dataInfo.temperature}}°C（异常描述）</span>
        <span><img src="~images/common/stu_abnormal.png" alt=""></span>
      </div>
      <div class="contact-teacher-btn" @click="$router.push('/contactPage')">联系导师</div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    dataInfo: {
      type: Object,
      default:()=> {},
    },
  },
}
</script>
<style lang="scss" scoped>
.container {
  position: relative;
  height: 60px;
  background:url('~images/theme/stu_title_bg.png') no-repeat;
  background-size: 100% 100%;
  border-radius: 5px;
  overflow: hidden;
  margin: 20px 15px 0;
  span {
    position: absolute;
    &:first-child {
      top: 14px;
      left: 18px;
      ul {
        display: flex;
        align-items: center;
        li {
          font-size: 16px;
          font-family: JCHEadA;
          color: #FFFFFF;
          &:nth-child(2),
          &:nth-child(4) {
            color: #CED7E9;
            font-size: 12px;
            padding: 0 3px;
            font-family: PingFangSC-Regular, PingFang SC;
          }
        }
      }
    }
    &:nth-child(2) {
      top: 32px;
      left: 39px;
      font-size: 12px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #FFFFFF;
    }
    &:nth-child(3) {
      left: 128px;
      top: 16px;
      width: 10px;
      height: 10px;
      display: grid;
      place-items: center;
      img {
        width: 100%;
        height: 100%;
      }
    }
    &:nth-child(4) {
      top: 16px;
      right: 92px;
      width: 10px;
      height: 10px;
      display: grid;
      place-items: center;
      img {
        width: 100%;
        height: 100%;
      }
    }
    &:nth-child(5) {
      position: absolute;
      top: 31px;
      left: 90px;
      font-size: 12px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #A9B9D8;
    }
    &:nth-child(6) {
      position: absolute;
      top: 31px;
      right: 91px;
      font-size: 12px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #A9B9D8;
    }
    &:nth-child(7) {
      ul{
        display: flex;
        li {
           position: absolute;
          &:first-child {
            top: 11px;
            left: 147px;
            font-size: 40px;
            font-family: JCHEadA;
            color: #FFFFFF;
          }
          &:nth-child(2) {
            left: 182px;
            top: 18px;
            font-size: 30px;
            font-family: JCHEadA;
            color: #FFFFFF;
          }
          &:last-child {
            left: 193px;
            top: 20px;
            font-size: 30px;
            font-family: JCHEadA;
            color: #FFFFFF;
          }
        }
      }
    }
    &:nth-child(8) {
      ul {
        display: flex;
        li {
          position: absolute;
          &:first-child {
            top: 11px;
            left: 262px;
            font-size: 40px;
            font-family: JCHEadA;
            color: #FFFFFF;
          }
          &:last-child {
            top: 19px;
            left: 300px;
            font-size: 30px;
            font-family: JCHEadA;
            color: #FFFFFF;
          }
        }
      }
    }
  }
}
.abnormal-container {
  position: relative;
  margin: 0 25px;
  border-radius: 0 0 5px 5px;
  overflow: hidden;
  .abnormal-item {
    height: 70px;
    background: #DD563F;
    span {
      position: absolute;
      &:first-child {
        top: 18px;
        left: 85px;
        font-size: 14px;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #FFFFFF;
      }
      &:nth-child(2) {
        top: 38px;
        left: 85px;
        font-size: 12px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #FFFFFF;
      }
      &:nth-child(3) {
        position: absolute;
        top: 18px;
        left: 35px;
        width: 36px;
        height: 36px;
        display: grid;
        place-items: center;
        img {
          width: 100%;
          height: 100%;
        }
      }
    }
  }
  .contact-teacher-btn {
    display: grid;
    place-items: center;
    height: 36px;
    background: #FFFFFF;
    font-size: 12px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #DD563F;
  }
}
</style>